﻿<%@ Page Language="C#" MasterPageFile="~/GoWLL.master" AutoEventWireup="true" CodeFile="CommunityRegister.aspx.cs" Inherits="CommunityRegister" Title="注册 - 我的社区 - G维网" %>
<%@ Register Src="Usercentermenu.ascx" TagName="Usercentermenu" TagPrefix="Menu" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceMenu" Runat="Server">
     <Menu:Usercentermenu ID="Usercentermenu1" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceMainText" Runat="Server">
    <div id="contenttext">
    <div class="panel" align="justify">
        <div class="bodytext" align="justify">
		    <strong>用户注册后可以使用我们提供的进一步的服务。</strong><br />
		    <br />
            注册的用户名为您任意选定的登陆用户名；密码长度限制为最低7位阿拉伯数字或字母的混合密码；用户邮箱请您填写必要的专用邮箱，一个用户只能使用唯一的一个邮箱与之对应。创建社区后，邮箱是我们唯一与您沟通的渠道，请务必填写您的真实邮箱地址。 
        </div>
     </div>
	    <div class="panel" align="justify">
		    <span class="orangetitle">Register</span>
		    <span class="bodytext"><br /><br />
                <form id="Form1" runat=server>
                    <table>
                        <tr>
                            <td width="80">
                            </td>
                            <td align=center width="160">注册新帐户</td>
                            <td width="400">
                            </td>
                        </tr>
                        <tr>
                            <td align=right>用户名:</td>
                            <td>
                                <asp:TextBox ID="TextUserName" runat="server" Width="160px"></asp:TextBox></td>
                            <td>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="TextUserName"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td align=right>密码:</td>
                            <td>
                                <asp:TextBox ID="TextPassword" runat="server" TextMode="Password" Width="160px"></asp:TextBox></td>
                            <td align="left">
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="TextPassword"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td align=right>确认密码:</td>
                            <td>
                                <asp:TextBox ID="TextRePassword" runat="server" TextMode="Password" Width="160px"></asp:TextBox></td>
                            <td>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*" ControlToValidate="TextRePassword"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td align=right>电子邮件:</td>
                            <td>
                                <asp:TextBox ID="TextEMail" runat="server" Width="160px" AutoCompleteType="Email"></asp:TextBox></td>
                            <td>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*" ControlToValidate="TextEMail"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td align=right>
                                验证码:</td>
                            <td>
                                <asp:TextBox ID="TextImgCode" runat="server" Width="104px"></asp:TextBox>&nbsp;
                                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="ImgCode.aspx" /></td>
                            <td>
                                
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="*" ControlToValidate="TextImgCode"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td colspan="3" style="padding-left:20px;">
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextUserName"
                                    Display="Dynamic" ErrorMessage="“用户名”必须是英文字母或汉字(限20字符，每汉字占2字符)。" ValidationExpression="[a-zA-Z\u0100-\uFFFF]{2,10}"></asp:RegularExpressionValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TextPassword"
                                    Display="Dynamic" ErrorMessage="“密码”长度必须为3-20位。" ValidationExpression="[^\r]{3,20}"></asp:RegularExpressionValidator>
                                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextPassword"
                                    ControlToValidate="TextRePassword" ErrorMessage="“密码”和“确认密码”必须相同。" Display="Dynamic"></asp:CompareValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="TextEMail"
                                    Display="Dynamic" ErrorMessage="“电子邮件”格式不正确。" ValidationExpression=".{1,}@.{1,}\..{1,}"></asp:RegularExpressionValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="TextEMail"
                                    Display="Dynamic" ErrorMessage="“电子邮件”太长(限50字符)。" ValidationExpression="[^\r]{1,50}"></asp:RegularExpressionValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="TextImgCode"
                                    Display="Dynamic" ErrorMessage="“验证码”输入有误。" ValidationExpression="[a-zA-Z]{4}"></asp:RegularExpressionValidator>
                                <asp:Label ID="LabelNotice" runat="server" ForeColor="Red"></asp:Label></td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td align=right width="160">
                                <asp:Button ID="ButtonSignUp" runat="server" Text="创建用户" OnClick="ButtonSignUp_Click" />
                                <asp:Button ID="ButtonGoing" runat="server" OnClick="ButtonGoing_Click" Text="进入“我的社区”"
                                    Visible="False" /></td>
                            <td>
                            </td>
                        </tr>
                    </table>
                </form>
		     </span>
	    </div>
	</div>
</asp:Content>
